from likeshop_project.BASE.myBase import Tools
from likeshop_project.API.login_api import login_module


class setDefaultAddress_module(Tools):
    path = "api/user_address/setdefault"

    def setDefaultAddress_action(self,id):
        url = self.host_url + self.path
        data = {
            'id': id,
        }
        head = login_module(session=self.session).get_head()
        msg = self.session.post(url=url, json=data, headers=head)
        return msg.json()
